cmake_minimum_required(VERSION 3.10)
project(FamilyTree)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 设置源文件目录
set(SOURCE_DIR ${PROJECT_SOURCE_DIR}/src)
set(MODULES_DIR ${PROJECT_SOURCE_DIR}/src/modules)

# 添加可执行文件
add_executable(FamilyTree
    ${SOURCE_DIR}/main.cpp
    ${MODULES_DIR}/calculate.cpp
    ${MODULES_DIR}/insert.cpp
    ${MODULES_DIR}/delete.cpp
    ${MODULES_DIR}/search.cpp
    ${MODULES_DIR}/modify.cpp
    ${MODULES_DIR}/sort.cpp
    ${MODULES_DIR}/display.cpp
    ${MODULES_DIR}/traversal.cpp
    ${MODULES_DIR}/read.cpp
)

# 添加头文件目录
target_include_directories(FamilyTree PRIVATE ${MODULES_DIR})